import time

from V6.Page.Page_Home import  ProxyHome
from V6.Page.Page_Login import PageLogin, ProxyLogin
from V6.utils import UtilsDriver, get_msg



class Test_login:
    def setup_class(self):
        self.proxy_home=ProxyHome()
        self.proxy_login=ProxyLogin()

        self.proxy_home.go_login()

    def setup(self):
        UtilsDriver().get_driver().refresh()

    def teardown_class(self):
        UtilsDriver.quit_driver()

    def test_login_01(self):
        self.proxy_login.login_page("15837321721","123456","8888")
        time.sleep(5)
        message = get_msg()
        time.sleep(2)
        assert "账号不存在" in message

    def test_login_02(self):
        self.proxy_login.login_page("15837321720", "", "8888")
        time.sleep(2)
        message=get_msg()
        time.sleep(2)
        assert "密码不能为空" in message
